#include <my_head.h>
int main(int argc, char const *argv[])
{
    int id = 1001;
    char name[30] = "张无忌";
    int age = 18;
    //直接打印到终端
    fprintf(stdout,"学号:[%d] 姓名:[%s] 年龄:[%d]\n",id,name,age);
    fprintf(stderr,"学号:[%d] 姓名:[%s] 年龄:[%d]\n",id,name,age);

    //打印到文件
    FILE *fp = fopen("hel.txt","w");
    if(NULL == fp)
        ERR_LOG("fopen error");
    fprintf(fp,"学号:[%d] 姓名:[%s] 年龄:[%d]\n",id,name,age);
    fclose(fp);
    return 0;
}
